package cn.ncupyh.soft;

public class Test_April2 {
    void say(){
        System.out.println("hello");
    }
    public static void main(String[] args) {
        Test_April2 a1 = new Test_April2();
        Test_April2 a2 = new Test_April2();
        a2.say();
        a1.say();
        a2=null;//a2置空后,失去了引用,无法输出!抛出异常!
        a2.say();//error
    }
}
